package cn.foolishbird.hamal.frame.base;

import lombok.Data;

/**
 * @author Eric
 * @version 1.0
 * @date 2019-05-04
 */
@Data
public class Rst<T> {

    public static final String CODE = "code";

    public static final String CONTENT = "content";

    public static final String DATA = "data";

    public static final String ERROR_CONTENT = "errorContent";

    /**
     * 返回状态码
     */
    private Integer code;

    /**
     * 返回说明
     */
    private String content;

    /**
     * 返回的具体内容
     */
    private T data;

    /**
     * 后台错误信息
     */
    private String errorContent;

    public Rst() {
        this(null, null, null);
    }

    public Rst(Integer code, String content, T data) {
        this.code = code;
        this.content = content;
        this.data = data;
    }

}
